package com.atguigu.gmall.list.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.list.SearchParam;
import com.atguigu.gmall.model.list.SearchResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: lx
 * @Time: 11:33
 * @Description:
 */
@FeignClient(name = "service-list",fallback = ListClientFeignImpl.class)
public interface ListClientFeign {

    //商品热度更新
    @GetMapping("/api/list/inner/hotScore/{skuId}")
    public Result hotScore(@PathVariable(name = "skuId") Long skuId);

    //开始搜索
    @PostMapping("/api/list")
    public SearchResponseVo list(@RequestBody SearchParam searchParam);

}
